(in-package :cl-daisyui)


;; https://daisyui.com/components/artboard/
(defmacro artboard (class inner-node &rest attrs)
  `(spinneret:with-html
     (:div :class ,class
           ,@attrs
           ,inner-node)))

;; https://daisyui.com/components/divider/
(defmacro divider (class label &rest attrs)
  `(spinneret:with-html
     (:div :class ,class
           ,@attrs
           ,label)))
(defmacro divider-no-text (class &rest attrs)
  `(spinneret:with-html
     (:div :class ,class
           ,@attrs)))

;; https://daisyui.com/components/drawer/
#|
.drawer // The root container
├── .drawer-toggle // A hidden checkbox to toggle the visibility of the sidebar
├── .drawer-content // All your page content goes here
│    ├── // navbar
│    ├── // content
│    ╰── // footer
╰── .drawer-side // Sidebar wrapper
       ├── .drawer-overlay // A dark overlay that covers the whole page when the drawer is open
       ╰── // Sidebar content (menu or anything)
|#
(defmacro drawer (class toggle content side &rest attrs)
  `(spinneret:with-html
     (:div :class ,class
           ,@attrs
           ,toggle
           ,content
           ,side)))

;; https://daisyui.com/components/footer/
(defmacro footer (class groups &rest attrs)
  `(spinneret:with-html
     (:div :class ,class
           ,@attrs
           ,@groups)))

;; https://daisyui.com/components/hero/
(defmacro hero (class content &rest attrs)
  `(spinneret:with-html
     (:div :class ,class
           ,@attrs
           ,content)))

;; https://daisyui.com/components/indicator/
(defmacro indicator (class indicator-item content-item &rest attrs)
  "Indicators are used to place an element on the corner of another element."
  `(spinneret:with-html
     (:div :class ,class
           ,@attrs
           ,indicator-item
           ,content-item)))

;; https://daisyui.com/components/join/
(defmacro joint (class items &rest attrs)
  `(spinneret:with-html
     (:div :class ,class
           ,@attrs
           ,@items)))


;; https://daisyui.com/components/mask/
(defmacro mask (class src &rest attrs)
  `(spinneret:with-html
     (:img :class ,class
           :src ,src
           ,@attrs)))

;; https://daisyui.com/components/stack/
(defmacro stack (class items &rest attrs)
  `(spinneret:with-html
     (:div :class ,class
           ,@attrs
           ,@items)))
